package com.mdd.generator.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 代码生成表列实体类
 */
@Data
@TableName("sys_gen_table_column")
public class GenTableColumn implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type= IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "表外键")
    private Integer tableId;
    @ApiModelProperty(value = "列名称")
    private String columnName;
    @ApiModelProperty(value = "列描述")
    private String columnComment;
    @ApiModelProperty(value = "列长度")
    private String columnLength;
    @ApiModelProperty(value = "列类型")
    private String columnType;
    @ApiModelProperty(value = "JAVA类型")
    private String javaType;
    @ApiModelProperty(value = "JAVA字段")
    private String javaField;
    @ApiModelProperty(value = "是否主键: [1=是, 0=否]")
    private Integer isPk;
    @ApiModelProperty(value = "是否自增: [1=是, 0=否]")
    private Integer isIncrement;
    @ApiModelProperty(value = "是否必填: [1=是, 0=否]")
    private Integer isRequired;
    @ApiModelProperty(value = "是否插入字段: [1=是, 0=否]")
    private Integer isInsert;
    @ApiModelProperty(value = "是否编辑字段: [1=是, 0=否]")
    private Integer isEdit;
    @ApiModelProperty(value = "是否列表字段: [1=是, 0=否]")
    private Integer isList;
    @ApiModelProperty(value = "是否查询字段: [1=是, 0=否]")
    private Integer isQuery;
    @ApiModelProperty(value = "查询方式: [等于、不等于、大于、小于、范围]")
    private String queryType;
    @ApiModelProperty(value = "显示类型: [文本框、文本域、下拉框、复选框、单选框、日期控件]")
    private String htmlType;
    @ApiModelProperty(value = "字典类型")
    private String dictType;
    @ApiModelProperty(value = "排序编号")
    private Integer sort;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}
